using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace NameSpace
{
    /// <summary>
    /// Logique d'interaction pour AccountNumberUC.xaml
    /// </summary>
    public partial class AccountNumberUC : UserControl
    {
        #region Public Properties
        public string Label
        {
            get
            {
                return lblAccountNumber.Content.ToString();
            }
            set
            {
                lblAccountNumber.Content = value;
            }
        }
        public string Text
        {
            get
            {
                return txtAccountNumber.Text;
            }
            set
            {
                txtAccountNumber.Text = value;
                //OnTextChanged(this, new TextChangedEventArgs(new RoutedEvent(),new UndoAction()));
            }
        }
        #endregion

        #region Delegates and Events
        public delegate void OnTextChangedEventHandler(object sender, TextChangedEventArgs e);
        public event OnTextChangedEventHandler OnTextChanged;
        #endregion

        public AccountNumberUC()
        {
            InitializeComponent();
            //COMMENT : Old method, replaced with private void txtAccountNumber_TextChanged
			//txtAccountNumber.TextChanged += OnTextChanged(this, new TextChangedEventArgs(new RoutedEvent(),new UndoAction()));
        }

		private void txtAccountNumber_TextChanged(object sender, TextChangedEventArgs e)
        {
            OnTextChanged(sender, e);
        }
    }
}

